Skip to content

Instantly share code, notes, and snippets.

@davydany
davydany / IPTABLES-CHEATSHEET.md
Last active May 17, 2024 07:55
IP Tables (iptables) Cheat Sheet

IP Tables (iptables) Cheat Sheet

IPTables is the Firewall service that is available in a lot of different Linux Distributions. While modifiying it might seem daunting at first, this Cheat Sheet should be able to show you just how easy it is to use and how quickly you can be on your way mucking around with your firewall.

Resources

The following list is a great set of documentation for iptables. I used them to compile this documentation.

This file has been truncated, but you can view the full file.
#!/usr/bin/env node
/**
* @license Copyright 2021 Stackblitz, Inc. All Rights Reserved.
* Portions of this software are patent pending in USA and EU jurisdictions.
* More info available at https://stackblitz.com/terms-of-service
*/
! function(e, t) {
if ("object" == typeof exports && "object" == typeof module) module.exports = t(function() {
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@edin-m
edin-m / html5-video-play-file-blob.html
Last active May 17, 2024 07:45
HTML video play file blob object url
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<video></video>
<br/>
<input type="file" name="file" id="fileItem" onchange="onChange()" >
@glibg10b
glibg10b / .md
Created December 15, 2023 11:48
Access hidden Huawei router settings

Huawei reuses the same interface for many of their routers, but chooses to hide some features. Some of these may not be supported by the hardware, but others may work fine.

The features are hidden using the HTML hidden attribute. To turn this attribute off for all elements on a page, open your browser's dev tools and type $('#*').show() into the console.

On my B315, this allows me to change the DNS server addresses sent via DHCP:

image

@james-d-elliott
james-d-elliott / configuration.yml
Last active May 17, 2024 07:41
Authelia Sample Configuration
###############################################################
# Authelia minimal configuration #
###############################################################
port: 9091
logs_level: info
jwt_secret: insecure_secret
authentication_backend:
file:
path: /etc/authelia/users.yml
totp:
from Crypto.Cipher import AES
import json, string, zlib, hashlib
# NOTE: You must set these as global variables ahead of time.
# TODO: Accept as parameters to API, have a stateful class or something
server_secret = ''
client_secret = ''
# Usage notes:
# Initially, communications only have request crypto, and payloads are plaintext gzip
@padeoe
padeoe / README_hfd.md
Last active May 17, 2024 07:38
CLI-Tool for download Huggingface models and datasets with aria2/wget+git

🤗Huggingface Model Downloader

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, this command-line tool smartly utilizes wget or aria2 for LFS files and git clone for the rest.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
  • 🚀 Multi-threaded Download: Utilize multiple threads to speed up the download process.
  • 🚫 File Exclusion: Use --exclude or --include to skip or specify files, save time for models with duplicate formats (e.g., *.bin or *.safetensors).
  • 🔐 Auth Support: For gated models that require Huggingface login, use --hf_username and --hf_token to authenticate.
  • 🪞 Mirror Site Support: Set up with HF_ENDPOINT environment variable.

MIFARE Classic

Here are the steps to follow in order to read your cards. Your goal is to find as many keys as possible. The keys unlock sections of your card for the Flipper to read them - you must have a card. Once you read enough sections, you can use an emulated or cloned card at the original card reader to unlock it (sometimes even without finding all of the keys!).

Reading the card

Steps:

  1. Dictionary attack: Try to scan your MIFARE Classic card with NFC -> Read. It will try a dictionary attack of default keys to unlock your card, as well as any keys you may have found through other methods. Do not interrupt the dictionary attack, it may take a while! If it finds 32/32 keys (or 80/80) with 16/16 sectors (or 40/40), congratulations and proceed to "Emulation". If not, continue to step 2.
  2. Mfkey32 attack (): If you have only a few keys found or no keys found, you can get mor